﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using GGJ_DKG.Objects;
using GGJ_DKG.Menu;
using GGJ_DKG.Managers;
namespace GGJ_DKG.Objects
{
    class AnimatedObject:Object2D
    {
        //Animation animation;
        Texture2D texture;
        
        public AnimatedObject(Texture2D texture, ContentManager Content)
            : base(texture)
        {
            
            this.texture = texture;
            

            //animation = new Animation(Content.Load<Texture2D>("SpritesPlayer/spritesheepDIVER"),
            //    new Vector2(Game1.Self.Window.ClientBounds.Width / 2f, Game1.Self.Window.ClientBounds.Height - 24),
            //    new Vector2(6, 0),
            //    new Vector2(150, 59), 6);

        }

        public void Update(GameTime gameTime)
        {

            //animation.Position.X = MathHelper.Clamp(animation.Position.X,
            //    animation.FrameSize.X, Game1.Self.Window.ClientBounds.Width - animation.FrameSize.X);

            //animation.Update(gameTime);
        }

        public void Draw(SpriteBatch spriteBatch, GraphicsDeviceManager graphics)
        {
            if (Visible == true)
            {
                spriteBatch.Draw(Texture, Position, null, ObjectColor * Alpha,
                    MathHelper.ToRadians(Rotation), MiddlePoint, ScaleVector, SpriteEffects.None, 0.5f);

            }

        }
    }
}
